home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / docs / winer / chap11-4.bas < prev    next >
Encoding:
BASIC Source File  |  1992-05-13  |  452 b   |  20 lines

  1. '*********** CHAP11-4.BAS - demonstrates changing the current default drive
  2.  
  3. 'Copyright (c) 1992 Ethan Winer
  4.  
  5. DEFINT A-Z
  6. DECLARE SUB ChDrive (Drive$)
  7.  
  8. '$INCLUDE: 'REGTYPE.BI'
  9.  
  10. DIM SHARED Registers AS RegType
  11.  
  12. INPUT "Enter the drive to make current: ", NewDrive$
  13. CALL ChDrive(NewDrive$)
  14.  
  15. SUB ChDrive (Drive$) STATIC
  16.   Registers.AX = &HE00
  17.   Registers.DX = ASC(UCASE$(Drive$)) - 65
  18.   CALL Interrupt(&H21, Registers, Registers)
  19. END SUB
  20.